# print(type(123.0000000))
#
# print(type('和我'),type('123'))

#----------------------------------------------
#数据类型转换
#1.任何类型都可以通过str转化为字符串
# num_str = str('111')
# print(type(num_str),num_str)
#
# #2.将字符串转化为数字
# num = int('123')
# print(type(num),num)
#
# #3.将字符串转化为浮点
# num_float = float('123.123')
# print(type(num_float),num_float)
#
#
# int_num = int(123.13)
# print(type(int_num),int_num)

#----------------------------------------------
#标识符
#1.限定只能使用：中文、英文、数字、下划线，注意：不能以数字开头，不建议以中文定义

#2.大小写敏感
# student = '张三'
# Student = 123
# print(student)
# print(Student)

#3.不可使用关键字
# class = 1
# Class = 1
#
# num = 9
# num /= 2
# print(num)
# num = 9
# #//= 取整除
# num //= 2
# print(num)
#
# #----------------------------------------------
# #字符串三种定义
# name = '黑马程序员'
#
# name1 = "黑马程序员"
#
# name2 = """黑
# 马
# 程序
# 员"""
#
# #将""赋给字符串
# name3 = "\"\""
# name4 = '""'
# name5 = '\'\''
# print(name3)
#
# #字符串拼接
# a = 10
# #拼接只能进行字符串之间的拼接，
# # print("123"+"abc" + a)
#
# #字符串格式化
# #通过占位拼接
# name6 = "程序员"
# message = "牛马%s" % name6
# print(message)
#
# #通过%s将数字类型转换为字符串
# name7 = 123
# name8 = 456
# message1 = "name7 等于 %s;name8 等于 %s" %(name7,name8)
# print(message1)
#
# age = 15
# height = 172.5
# #=如果%md，中的m宽度比数字本身宽度小，则不会生效
# message2 = "name = %s,age = %d,height = %2.2f" %(name,age,height)
# print(message2)
#
# #字符串格式化，快速写法
# #该方法不关心精度和类型，直接将数据放入
# message3 = f"name = {name},age = {age},height = {height}"
# print(message3)
#
#
#
# ####################################
# stock_price = 19.99
# stock_code = 300888
# stock_price_daily_growth_factor = 1.2
# growth_days = 7
# print(f"公司：{name},股票代码：{stock_code},当前股价：{stock_price}，\n"
#       +"每日增长系数：%.2f，经过%d天的增长后"
#       f"，股价达到%.2f" %(stock_price_daily_growth_factor,growth_days,
#                          stock_price*stock_price_daily_growth_factor**growth_days))
#
#
# #-----------------------------------------------------------
# print("你的名字？")
# #对于input不论输入的类型是什么，最终都为字符串
# name9 = input("输入:")
# name9 = int(name9)
#
# print(name9,type(name9))